package com.beasts.ant.page.common.dto;

import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * ant-uc 传输对象
 *
 * @author Locker
 * @date 31/05/2018 10:49 AM
 * @since 1.0
 */
@Data
public class AntUCDTO {

    private String id;

    private String username;

    private String password;

    private String message;

    private Integer statusCode;

    private Boolean success;

    private Permissions permissions;

    public AntUCDTO() {
        this.password = "";
        this.permissions = new Permissions();
    }

    // 内部类，权限
    @Data
    class Permissions {
        List visit;
        String role;

        public Permissions() {
            this.visit = new ArrayList();
            this.role = "";
        }
    }


    // 设置Permission
    public void setPermissionsRole(String role) {
        this.permissions.setRole(role);
    }

    public void setPermissionsVisit(List list) {
        this.permissions.setVisit(list);
    }

}
